import java.util.Comparator;


public class EventComparatorByTime implements Comparator<Event> {
	public int compare(Event eve1, Event eve2){
		long eve1Time = eve1.getTimeStamp().getTimeInMillis();
		long eve2Time = eve2.getTimeStamp().getTimeInMillis();
		if(eve1Time<eve2Time){
			return -1;
		}
		else if (eve1Time>eve2Time){
			return 1;
		}
		else {
			return 0;
		}
		
	}
}
